package cn.mw.cmdb.enums;

public enum DatasourceSyncTypeEnum {

    manual("manual", "手动"),
    auto("auto", "自动");

    private String type;
    private String desc;

    DatasourceSyncTypeEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public String getDesc() {
        return this.desc;
    }

    public String getType(){
        return this.type;
    }

    public static String getDescByType(String type) {
        for (DatasourceSyncTypeEnum r : DatasourceSyncTypeEnum.values()) {
            if (r.getType().equals(type)) {
                return r.getDesc();
            }
        }
        return "";
    }

}
